import React, {Component} from 'react';
import {Image, Dimensions, View} from 'react-native';
import ImageZoom from 'react-native-image-pan-zoom';

export default class App extends Component {
    render() {
        return (
            <View style={{width: '100%', height: 400, marginTop: 50, borderWidth: 1}}>
                <ImageZoom
                    style={{position: 'absolute', left: 0, top: 0}}
                    onMove={(position) => {
                        console.log(position);
                    }}
                    panToMove={true}
                    cropWidth={'100%'}
                    cropHeight={400}
                    imageWidth={200}
                    imageHeight={200}
                    minScale={1}
                    maxScale={3}>
                    <Image style={{width: 200, height: 200}} source={require('~/assets/public/demo2x.png')} />
                </ImageZoom>
            </View>
        );
    }
}
